﻿using System;
using System.Text;
using System.Collections.Generic;
using System.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System.Web.Mvc;
using Rhino.Mocks;
using AspZone.Commerce.Repositories;
using AspZone.Commerce.Web.Controllers;
using AspZone.Commerce.Model;

namespace WebControllerUnitTests.Controllers
{
    /// <summary>
    /// Summary description for CategoryControllerTest
    /// </summary>
    [TestClass]
    public class CategoryControllerTest
    {
        [TestMethod]
        public void Index()
        {
            Assert.Inconclusive("Rewrite this test");

            // Setup
            //MockRepository mocks = new MockRepository();
            //ICategoryRepository repository = mocks.CreateMock<ICategoryRepository>();
            //List<Category> categories = new List<Category> { new Category { Name = "Name", SEOName = "SEOName" } };
            //using (mocks.Record())
            //{
            //    SetupResult.For<List<Category>>(repository.GetVisibleRootCategories()).Return(categories);
            //}
            //CategoryController controller = new CategoryController(repository);

            //// Execute
            //ViewResult result = controller.Index() as ViewResult;

            //// Verrify
            //ViewDataDictionary viewData = result.ViewData as ViewDataDictionary;
            //Assert.IsInstanceOfType(viewData["Categories"], typeof(List<Category>));
            
        }
    }
}
